<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:Utils="urn:Utils"
	exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Utils ">


  <xsl:output method="xml" omit-xml-declaration="yes"/>

  <xsl:param name="currentPage"/>

  <xsl:template match="/">
    <section id="content">
      <div class="container_12">
        <div class="wrapper">
          <article class="grid_8">
            <xsl:for-each select="$currentPage/child::ContentPage[contentType='Quem Somos']">
              <h2 class="border1">
                <xsl:value-of select="contentTitle"/>
              </h2>
              <div class="page2-box1">
                <span class="link1">
                  <xsl:value-of select="contentSummary"/>
                </span>
                <xsl:if test="contentThumbnail !=''">
                  <figure class="page2-img1">
                    <img src="{Utils:GetImageUrl(contentThumbnail)}" class="mn_quemSomos_textoPrincipal" alt="" />
                  </figure>
                </xsl:if>
                <div class="extra-wrap">
                  <xsl:value-of select ="contentBody" disable-output-escaping="yes"></xsl:value-of>
                </div>
              </div>
            </xsl:for-each>
            <xsl:for-each select="$currentPage/child::ContentPage[contentType='Outro']">
              <div class="page2-box2">
                <xsl:if test="contentThumbnail !=''">
                  <figure class="page2-img2">
                    <img src="{Utils:GetImageUrl(contentThumbnail)}" class="mn_quemSomos_outros_textos" alt="" />
                  </figure>
                </xsl:if>
                <div class="extra-wrap">
                  <span class="link5">
                    <xsl:value-of select="contentTitle"/>
                  </span>
                  <p>
                    <xsl:value-of select ="contentBody" disable-output-escaping="yes"></xsl:value-of>
                  </p>
                </div>
                <div class="clear"></div>
              </div>
            </xsl:for-each>
          </article>
          <article class="grid_4">
            <xsl:for-each select="$currentPage/child::List">
              <h2 class="p9 border1">
                <xsl:value-of select="listTitle"/>
              </h2>
              <xsl:variable name="numberOfMembers" select="listNumberOfItems"></xsl:variable>
              <xsl:for-each select="./child::PersonPage">
                <xsl:if test="position()&lt;= $numberOfMembers ">
                  <div class="page2-box3">
                    <xsl:if test="contentThumbnail !=''">
                      <figure class="page2-img3">
                        <img src="{Utils:GetImageUrl(contentThumbnail)}" class="mn_quemSomos_membros_foto" alt="" />
                      </figure>
                    </xsl:if>
                    <div class="extra-wrap">
                      <a class="link2" href="{umbraco.library:NiceUrl(@id)}">
                        <xsl:value-of select="contentTitle"/>
                      </a>
                      <p>
                        <xsl:value-of select="personRole"/>
                      </p>
                    </div>
                  </div>
                </xsl:if>
              </xsl:for-each>
            <a class="link3" href="{umbraco.library:NiceUrl(@id)}">Conhecer toda a equipa >></a>
            </xsl:for-each>            
            <!--<h2 class="border1 p10">Partnering &amp; Licensing</h2>
            <ul class="list2">
              <li>
                <a href="#">Partnering</a>
              </li>
              <li>
                <a href="#">Commitment to Partnering</a>
              </li>
              <li>
                <a href="#">Why Partner With Us?</a>
              </li>
              <li>
                <a href="#">Technology Focus Areas</a>
              </li>
              <li>
                <a href="#">Our Partnering Process</a>
              </li>
            </ul>-->
          </article>
        </div>
      </div>
    </section>
  </xsl:template>

</xsl:stylesheet>